Conventionally, an information processing system has been known that generates and provides an image (a virtual shot image) to be acquired by shooting with a virtual camera set in a virtual space. Examples of the information processing system include a game system that develops a game in a virtual space and a virtual reality (VR) system that provides VR.
The information processing system moves the virtual camera in the virtual space in accordance with movement of a predetermined object to be captured (e.g., a player character object for a game), to shoot the object to be captured so that an image including the object to be captured is generated. In a case where a different object (a shielding object) is present between the object to be captured and the virtual camera as a result of the virtual camera that has moved in accordance with the movement of the object to be captured, the information processing system performs control of moving the virtual camera to an avoidance position at which no shielding of the shielding object occurs, for example, a position between the object to be captured and the shielding object (shielding avoidance control).
However, according to the shielding avoidance control described above, the virtual camera may suddenly move to the avoidance position so that the image to be generated also varies suddenly.
An object of the present disclosure is to achieve a natural variation in an image with a virtual camera moving in a virtual space. Another object of the present disclosure is to reduce a processing load in shielding avoidance control.
An information processing system according to one aspect includes: a camera destination calculating unit configured to calculate a position of a destination of a virtual camera in a virtual space, based on predetermined information processing; a camera moving unit configured to move the virtual camera to an avoidance position at which a shielding object is avoided, in a case where a first vector heading from a position of an object to be captured by the virtual camera to the position of the destination, intersects with the shielding object from an outside in the virtual space and a second vector heading from the position of the destination to the position of the object to be captured by the virtual camera, does not intersect with the shielding object from the outside; and an image generating unit configured to generate an image of the virtual space, based on the virtual camera moved by the camera moving unit.
The case where the first vector heading from the position of the object to be captured to the position of the destination of the virtual camera, intersects with the shielding object from the outside and the second vector heading from the position of the destination of the virtual camera to the position of the object to be captured, does not intersect with the shielding object from the outside, namely means that the position of the destination of the virtual camera is inside the shielding object. In this manner, the virtual camera moves the avoidance position instead of the position of the destination that has been calculated, in the case where the position of the destination of the virtual camera that has been calculated is inside the shielding object. Thus, a natural variation in the image with the virtual camera can be achieved in comparison to a case where the virtual camera constantly moves to the avoidance position when the shielding object shields the object to be captured when viewed from the virtual camera. Determining whether the first vector heading from the position of the object to be captured to the position of the destination of the virtual camera and the second vector heading from the position of the destination of the virtual camera to the position of the object to be captured, each intersect the shielding object from the outside, determines whether the position of the destination of the virtual camera is inside the shielding object. Thus, the processing load of shielding avoidance control can be reduced in comparison to a case where it is directly determined whether the position of the destination of the virtual camera is inside the shielding object.
The camera moving unit may move the virtual camera to the position of the destination in a case where the first vector does not intersect with the shielding object from the outside.
The case where the first vector does not intersect with the shielding object from the outside means that no shielding object is present between the object to be captured and the destination of the virtual camera and the shielding object does not shield the object to be captured when viewed from the virtual camera. In this case, the virtual camera moves to the destination that has been calculated. With this configuration, in a case where the shielding object does not shield the object to be captured, the virtual camera can move to the position of the destination calculated based on the predetermined information processing.
The camera moving unit may move the virtual camera to the position of the destination in a case where the first vector intersects with the shielding object from the outside and the second vector intersects with the shielding object from the outside.
The case where the first vector intersects with the shielding object from the outside and the second vector also intersects with the shielding object from the outside, means that the shielding object is present between the object to be captured and the virtual camera but the virtual camera is outside the shielding object. With this configuration, in such a case, the virtual camera may move to the position of the destination calculated based on the predetermined information processing, without the shielding avoidance control.
The avoidance position may be at a position on a side of the object to be captured from the shielding object.
With this configuration, the shielding object does not shield the virtual camera at the avoidance position, and thus the image including the object to be captured not shielded can be generated.
The camera destination calculating unit may calculate the position of the destination, based on the predetermined information processing based on an operation of a player.
With this configuration, the position of the destination of the virtual camera can be calculated based on the operation of the player.
The camera destination calculating unit may perform the information processing to move the virtual camera in accordance with movement of the object to be captured that moves in the virtual space based on the operation of the player, and may calculate the position of the destination.
With this configuration, the virtual camera moves in accordance with the movement of the object to be captured that moves based on the operation of the player. Thus, an image of the object to be captured can be acquired, with the player not directly paying attention to an instruction for moving the virtual camera.
The camera destination calculating unit may perform the information processing to move the virtual camera in accordance with an instruction of the player for moving the virtual camera, and may calculate the position of the destination.
With this configuration, the player can directly issue the instruction for moving the virtual camera.
The image generating unit may generate the image indicating the position of the object to be captured in the virtual space, the object to be captured being shielded by the shielding object.
With this configuration, even in a case where the shielding object shields the object to be captured, the position of the object to be captured in the virtual space can be grasped in the image.
The image generating unit may generate the image indicating the object to be captured with a silhouette, the object to be captured being shielded by the shielding object.
With this configuration, the image to be captured is displayed with the silhouette on a screen even in a case where the shielding object shields the object to be captured. Thus, the state of the object to be captured can be grasped.
The information processing system may further include: a first determining unit configured to perform first determination of whether the first vector intersects with the shielding object from the outside; and a second determining unit configured to perform second determination of whether the second vector intersects with the shielding object from the outside. The camera moving unit may move the virtual camera based on a result of the first determination and a result of the second determination.
With this configuration, the first determination and the second determination can be performed as the respective determination processing.
The second determining unit may perform the second determination in a case where the first determining unit determines that the first vector intersects with the shielding object from the outside.
With this configuration, the processing load can be reduced with the second determination not performed in a case where the second determination is unnecessary.
A game system according to one aspect includes: a player character control unit configured to move a player character object in a virtual space based on an operation of a player; a camera destination calculating unit configured to calculate a position of a destination of a virtual camera in the virtual space, in accordance with the movement of the player character object; a shielding determining unit configured to determine whether a shielding object is present between the position of the destination and the player character object; a collision determining unit configured to determine whether the position of the destination is inside the shielding object; a camera moving unit configured to move the virtual camera to a position on a side of the player character object from the shielding object when the shielding determining unit determines that the shielding object is present and the collision determining unit determines that the destination is inside the shielding object; and an image generating unit configured to generate an image of the virtual space to display the image indicating, on the shielding object, that the player character object is present, the player character object being shielded by the shielding object, when the shielding determining unit determines that the shielding object is present and the collision determining unit determines that the position of the destination is outside the shielding object.
With this configuration, avoidance control is performed in a case where the virtual camera moves to the inside of the shielding object, and no avoidance control is performed in a case where the virtual camera is outside the shielding object but the shielding object is present between the virtual camera and the player character object to shield the player character object. Thus, a sudden variation in the image can be avoided. In addition, the image indicating, on the shielding object, that the player character object is present, can be displayed. Thus, it can be confirmed whether the player character object is present, without the avoidance control.
A non-transitory storage medium according to one aspect has stored an information processing program for causing an information processing device to execute: camera destination calculating processing of calculating a position of a destination of a virtual camera in a virtual space, based on predetermined information processing; camera moving processing of moving the virtual camera to an avoidance position at which a shielding object is avoided, in a case where a first vector heading from a position of an object to be captured by the virtual camera to the position of the destination, intersects with the shielding object from an outside in the virtual space and a second vector heading from the position of the destination to the position of the object to be captured by the virtual camera, does not intersect with the shielding object from the outside; and image generating processing of generating an image of the virtual space, based on the virtual camera moved by the camera moving processing.
With this configuration, the virtual camera moves the avoidance position instead of the position of the destination that has been calculated, in the case where the position of the destination of the virtual camera that has been calculated is inside the shielding object. Thus, a natural variation in the image with the virtual camera can be achieved in comparison to a case where the virtual camera constantly moves to the avoidance position when the shielding object shields the object to be captured when viewed from the virtual camera. Determining whether the first vector heading from the position of the object to be captured to the position of the destination of the virtual camera and the second vector heading from the position of the destination of the virtual camera to the position of the object to be captured, each intersect the shielding object from the outside, determines whether the position of the destination of the virtual camera is inside the shielding object. Thus, the processing load of shielding avoidance control can be reduced in comparison to a case where it is directly determined whether the position of the destination of the virtual camera is inside the shielding object.
The camera moving processing may move the virtual camera to the position of the destination in a case where the first vector does not intersect with the shielding object from the outside.
With this configuration, in a case where the shielding object does not shield the object to be captured, the virtual camera can move to the position of the destination calculated based on the predetermined information processing.
The camera moving processing may move the virtual camera to the position of the destination in a case where the first vector intersects with the shielding object from the outside and the second vector intersects with the shielding object from the outside.
With this configuration, the virtual camera can move to the position of the destination calculated based on the predetermined information processing, without the shielding avoidance control, in a case where the shielding object is present between the object to be captured and the virtual camera but the virtual camera is outside the shielding object.
The avoidance position may be at a position on a side of the object to be captured from the shielding object.
With this configuration, the shielding object does not shield the virtual camera at the avoidance position, and thus the image including the object to be captured not shielded can be generated.
The camera destination calculating processing may calculate the position of the destination, based on the predetermined information processing based on an operation of a player.
With this configuration, the position of the destination of the virtual camera can be calculated based on the operation of the player.
The camera destination calculating processing may perform the information processing to move the virtual camera together with movement of a player character object that moves in the virtual space based on the operation of the player, and may calculate the position of the destination.
With this configuration, the virtual camera moves in accordance with the movement of the object to be captured that moves based on the operation of the player. Thus, an image of the object to be captured can be acquired, with the player not directly paying attention to an instruction for moving the virtual camera.
The camera destination calculating processing may perform the information processing to move the virtual camera in accordance with an instruction of the player for moving the virtual camera, and may calculate the position of the destination.
With this configuration, the player can directly issue the instruction for moving the virtual camera.
The image generating processing may generate the image indicating the position of the object to be captured in the virtual space, the object to be captured being shielded by the shielding object.
With this configuration, even in a case where the shielding object shields the object to be captured, the position of the object to be captured in the virtual space can be grasped in the image.
The image generating processing may generate the image indicating the object to be captured with a silhouette, the object to be captured being shielded by the shielding object.
With this configuration, the image to be captured is displayed with the silhouette on a screen even in a case where the shielding object shields the object to be captured. Thus, the state of the object to be captured can be grasped.
The non-transitory storage medium may have stored the information processing program for causing the information processing device to further execute: first determining processing of performing first determination of whether the first vector intersects with the shielding object from the outside; and second determining processing of performing second determination of whether the second vector intersects with the shielding object from the outside. The camera moving processing may move the virtual camera based on a result of the first determination and a result of the second determination.
With this configuration, the first determination and the second determination can be performed as the respective determination processing.
The second determining processing may perform the second determination in a case where the first determining processing determines that the first vector intersects with the shielding object from the outside.
With this configuration, the processing load can be reduced with the second determination not performed in a case where the second determination is unnecessary.
A non-transitory storage medium according to one aspect has stored a game program for causing an information processing device to execute: player character control processing of moving a player character object in a virtual space based on an operation of a player; camera destination calculating processing of calculating a position of a destination of a virtual camera in the virtual space, in accordance with the movement of the player character object; shielding determining processing of determining whether a shielding object is present between the position of the destination and the player character object; collision determining processing of determining whether the position of the destination is inside the shielding object; camera moving processing of moving the virtual camera to a position on a side of the player character object from the shielding object when the shielding determining processing determines that the shielding object is present and the collision determining processing determines that the position of the destination is inside the shielding object; and image generating processing of generating an image of the virtual space to display the image indicating, on the shielding object, that the player character object is present, the player character object being shielded by the shielding object, when the shielding determining processing determines that the shielding object is present and the collision determining processing determines that the position of the destination is outside the shielding object.
With this configuration, avoidance control is performed in a case where the virtual camera moves to the inside of the shielding object, and no avoidance control is performed in a case where the virtual camera is outside the shielding object but the shielding object is present between the virtual camera and the player character object to shield the player character object. Thus, a sudden variation in the image can be avoided. In addition, the image indicating, on the shielding object, that the player character object is present, can be displayed. Thus, it can be confirmed whether the player character object is present, without the avoidance control.
An information processing device according to one aspect includes: a camera destination calculating unit configured to calculate a position of a destination of a virtual camera in a virtual space, based on predetermined information processing; a camera moving unit configured to move the virtual camera to an avoidance position at which a shielding object is avoided, in a case where a first vector heading from a position of an object to be captured by the virtual camera to the position of the destination, intersects with the shielding object from an outside in the virtual space and a second vector heading from the position of the destination to the position of the object to be captured by the virtual camera, does not intersect with the shielding object from the outside; and an image generating unit configured to generate an image of the virtual space, based on the virtual camera moved by the camera moving unit.
With this configuration, the virtual camera moves the avoidance position instead of the position of the destination that has been calculated, in the case where the position of the destination of the virtual camera that has been calculated is inside the shielding object. Thus, a natural variation in the image with the virtual camera can be achieved in comparison to a case where the virtual camera constantly moves to the avoidance position when the shielding object shields the object to be captured when viewed from the virtual camera. Determining whether the first vector heading from the position of the object to be captured to the position of the destination of the virtual camera and the second vector heading from the position of the destination of the virtual camera to the position of the object to be captured, each intersect the shielding object from the outside, determines whether the position of the destination of the virtual camera is inside the shielding object. Thus, the processing load of shielding avoidance control can be reduced in comparison to a case where it is directly determined whether the position of the destination of the virtual camera is inside the shielding object.
A game device according to one aspect includes: a player character control unit configured to move a player character object in a virtual space based on an operation of a player; a camera destination calculating unit configured to calculate a position of a destination of a virtual camera in the virtual space, in accordance with the movement of the player character object; a shielding determining unit configured to determine whether a shielding object is present between the position of the destination and the player character object; a collision determining unit configured to determine whether the position of the destination is inside the shielding object; a camera moving unit configured to move the virtual camera to a position on a side of the player character object from the shielding object when the shielding determining unit determines that the shielding object is present and the collision determining unit determines that the position of the destination is inside the shielding object; and an image generating unit configured to generate an image of the virtual space to display the image indicating, on the shielding object, that the player character object is present, the player character object being shielded by the shielding object, when the shielding determining unit determines that the shielding object is present and the collision determining unit determines that the position of the destination is outside the shielding object.
With this configuration, avoidance control is performed in a case where the virtual camera moves to the inside of the shielding object, and no avoidance control is performed in a case where the virtual camera is outside the shielding object but the shielding object is present between the virtual camera and the player character object to shield the player character object. Thus, a sudden variation in the image can be avoided. In addition, the image indicating, on the shielding object, that the player character object is present, can be displayed. Thus, it can be confirmed whether the player character object is present, without the avoidance control.
An information processing method according to one aspect includes: calculating a position of a destination of a virtual camera in a virtual space, based on predetermined information processing; moving the virtual camera to an avoidance position at which a shielding object is avoided, in a case where a first vector heading from a position of an object to be captured by the virtual camera to the position of the destination, intersects with the shielding object from an outside in the virtual space and a second vector heading from the position of the destination to the position of the object to be captured by the virtual camera, does not intersect with the shielding object from the outside; and generating an image of the virtual space, based on the virtual camera moved by the moving.
With this configuration, the virtual camera moves the avoidance position instead of the position of the destination that has been calculated, in the case where the position of the destination of the virtual camera that has been calculated is inside the shielding object. Thus, a natural variation in the image with the virtual camera can be achieved in comparison to a case where the virtual camera constantly moves to the avoidance position when the shielding object shields the object to be captured when viewed from the virtual camera. Determining whether the first vector heading from the position of the object to be captured to the position of the destination of the virtual camera and the second vector heading from the position of the destination of the virtual camera to the position of the object to be captured, each intersect the shielding object from the outside, determines whether the position of the destination of the virtual camera is inside the shielding object. Thus, the processing load of shielding avoidance control can be reduced in comparison to a case where it is directly determined whether the position of the destination of the virtual camera is inside the shielding object.
A game method according to one aspect includes: moving a player character object in a virtual space, based on an operation of a player; calculating a position of a destination of a virtual camera in the virtual space, in accordance with the movement of the player character object; determining whether a shielding object is present between the position of the destination and the player character object; determining whether the position of the destination is inside the shielding object; moving the virtual camera to a position on a side of the player character object from the shielding object when the determining whether the shielding object is present, determines that the shielding object is present and the determining whether the position of the destination is inside the shielding object, determines that the position of the destination is inside the shielding object; and generating an image of the virtual space to display the image indicating, on the shielding object, that the player character object is present, the player character object being shielded by the shielding object, when the determining whether the shielding object is present, determines that the shielding object is present and the determining whether the position of the destination is inside the shielding object, determines that the position of the destination is outside the shielding object.
With this configuration, avoidance control is performed in a case where the virtual camera moves to the inside of the shielding object, and no avoidance control is performed in a case where the virtual camera is outside the shielding object but the shielding object is present between the virtual camera and the player character object to shield the player character object. Thus, a sudden variation in the image can be avoided. In addition, the image indicating, on the shielding object, that the player character object is present, can be displayed. Thus, it can be confirmed whether the player character object is present, without the avoidance control.
The foregoing and other objects, features, aspects and advantages of the exemplary embodiments will become more apparent from the following detailed description of the exemplary embodiments when taken in conjunction with the accompanying drawings.